﻿
namespace Security.Authorizations
{
    using System;
    using System.Configuration.Provider;

    public sealed class AuthorizationProviderCollection : ProviderCollection
    {
        public override void Add(ProviderBase provider)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }
            if (!(provider is AuthorizationProvider))
            {
                throw new ArgumentException("Provider_must_implement_type");
            }
            base.Add(provider);
        }

        public void CopyTo(AuthorizationProvider[] array, int index)
        {
            base.CopyTo(array, index);
        }

        public new AuthorizationProvider this[string name]
        {
            get
            {
                return (AuthorizationProvider)base[name];
            }
        }
    }

}
